import redis.clients.util.JedisClusterCRC16;

/**
 * @Auther: tianchao
 * @Date: 2021/11/28 10:00
 * @Description:
 */
public class CRC16 {
    public static void main(String[] args) {
        String tianchao = "t1";
        System.out.println(JedisClusterCRC16.getCRC16(tianchao));
        System.out.println(JedisClusterCRC16.getCRC16(tianchao) % 16384);
        System.out.println(JedisClusterCRC16.getCRC16(tianchao) & (16384 - 1));
        System.out.println(JedisClusterCRC16.getCRC16("{user1}:1:name") & (16384 - 1));
        System.out.println(JedisClusterCRC16.getCRC16("{user1}:1:age") & (16384 - 1));
    }
}
